<?php
require_once 'BaseController.php';
class Admin_StatisticsController extends BaseController
{
    public $_email = null;
    public $_role = null;
    protected $_arrParam;
    public function init()
    {
        $this->view->module = $this->_request->getModuleName();
        $this->view->controller = $this->_request->getControllerName();
        $this->view->action = $this->_request->getActionName();
        $this->_arrParam = $this->_request->getParams();
        unset($this->_arrParam['controller']);
        unset($this->_arrParam['action']);
        unset($this->_arrParam['module']);

        Zend_Loader::loadClass('AuthModel');
        Zend_Loader::loadClass('AdminModel');
        Zend_Loader::loadClass('StatisticsModel');

        Zend_Loader::loadClass('AuthModel');
        $auth = new AuthModel();
        $this->_email = $auth->getIdentityField('sunnet_email');
        $this->_role = $auth->getIdentityField('role');
    }
    public function indexAction(){
        
    }
    public function downMp3Action(){
        $ModelS = new StatisticsModel();
        $row = $ModelS->fetchRow("name = 'down_mp3'");
        $this->view->downMp3 = $row['hits'];
    }
}